jQuery(document).ready(function () {
                    jQuery('#KarenTableContainer').jtable({
                        title: 'Animal',
                        actions: {
                            listAction: 'animal',
                            createAction: '/algo',
                            updateAction: '/algo',
                            deleteAction: '/algo'
                        },
                        fields: {
                            PersonId: {
                                key: true,
                                create: false,
                                edit: false,
                                list: false
                            },
                            NombreCientifico: {
                                title: 'Nombre cientifico',
                                width: '16%'
                            },
                            NombreComun: {
                                title: 'Nombre comun',
                                width: '13%'
                            },
                            Clasificacion: {
                                title: 'Clasificacion',
                                width: '10%',
                                type: 'combobox',
                                options: new Array('C50','C50','C50'),
                                defaultValue: 'C50'
                            },
                            Distribucion: {
                                title: 'Distribucion',
                                width: '15%',
                                type: 'textarea'
                            },
                            Bibliografia: {
                                title: 'Bibliografia',
                                width: '15%',
                                type: 'textarea'
                            },
                            Foto: {
                                title: 'Foto',
                                width: '10%',
                                display: function (data) {
                                    return '<image src="/Sizoo/resources/imagenes/muhnes.png" width="20" height="20" />';
                                },
                                input: function (data) {
                                    return '<input type="file" />';
                                }
                            },
                            Muestras: {
                                title: 'Muestras',
                                width: '10%'
                            },
                            Sinonimias: {
                                title: 'Sinonimias',
                                width: '10%',
                                sorting: false,
                                edit: false,
                                create: false,
                    display: function (data) {
                        //Create an image that will be used to open child table
                        var $img = $('<input type="button" value="Ver" />');
                        //Open child table when user clicks the image
                        $img.click(function () {
                            $('#KarenTableContainer').jtable('openChildTable',
                                    $img.closest('tr'),
                                    {
                                        title:'Sinonimias',
                                        actions: {
                                            listAction: 'sinonimia',
                                            createAction: '/algo',
                                            updateAction: '/algo'
                                        },
                                        fields: {
                                            PersonId: {
                                                key: true,
                                                create: false,
                                                edit: false,
                                                list: false
                                            },
                                            Nombre: {
                                                title: 'Nombre',
                                                width: '100%'
                                
                            }               
                          }
                                    }, function (data) { //opened handler
                                        data.childTable.jtable('load');
                                    });
                        });
                        //Return image to show on the person row
                        return $img;
                    }
                }
                        }
                    });

                    jQuery('#KarenTableContainer').jtable('load');
                });